import Vue from 'vue'
import App from './App'
// import store from './store'
// import util from './common/util'
// import MinRequest from './common/MinRequest.js'
// import minRequest from './api/api.js'


import cuCustom from './colorui/components/cu-custom.vue'

Vue.component('cu-custom', cuCustom)

// Vue.use(MinRequest)

Vue.config.productionTip = false

App.mpType = 'app'
// Vue.prototype.$store = store
// Vue.prototype.$util = util


//配置公共方法
// import common from './common/util.js'
// Vue.prototype.$noMultipleClicks = common.noMultipleClicks;

//配置 main.js  
//-------------------------main.js  
const $uni = new Proxy(uni, { //Proxy代理  
	get: (target, prop) => {
		return (options) => {
			return new Promise((resolve, reject) => {
				target[prop]({
					success: resolve,
					fail: reject,
					...options
				})
			})
		}
	},
	set: (target, prop, value) => {
		target[prop] = value
	}
})
Vue.prototype.$uni = $uni // 挂载到vue上    可以直接this.$uni.xxxx()  


const app = new Vue({
	// store,
	...App,
	// minRequest,
})
app.$mount()